<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>有效率的y模式</title>
</head>
<body>
    
</body>
<script>
    const str = 'Jimmy的QQ号码有很多，例如：1002661758,825806423,410922196等等都是Jimmy老师的QQ号'
    const reg = /(\d+),?/y
    let arr = []
    reg.lastIndex = 17
    console.log(reg.exec(str))
    console.log(reg.exec(str))
    console.log(reg.exec(str))
    console.log(reg.exec(str))
</script>
</html>